package minimips.isa.rtype;

import minimips.computer.Computer;

public class DadduInstruction extends RegisterWritingRTypeInstruction {

	public DadduInstruction(long memoryAddress, int rs,
			int rt, int rd, int extra) {
		super(memoryAddress, 0, "DADDU", rs, rt, rd, extra, 45);
	}

	@Override
	protected int getDestinationRegister() {
		return this.getOpcode() >> 11 & 31;
	}

	@Override
	protected long executeAluOperation(Computer computer) {
		long addResult = computer.getId_ex_a().getRegisterValue() + computer.getId_ex_b().getRegisterValue();
		return addResult;
	}
	
	

}
